Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support reading in registries-config via env #1199

Merged
merged 2 commits into from Feb 1, 2023

Conversation

padlar
Copy link
Contributor

@padlar padlar commented Jan 10, 2023

Fixes #1198

Signed-off-by: Sunil Shivanand <padlar@live.com>
@padlar
Copy link
Contributor Author

padlar commented Jan 11, 2023

Output with registries.Config set - read from env

➜  k3d git:(expose-config-env) make build && K3D_REGISTRIES_CONFIG=test2.yaml K3D_OPTIONS_RUNTIME_HOSTPIDMODE=true /Users/padlar/sandbox/k3d/bin/k3d cluster create test-cluster$ --verbose
fatal: No names found, cannot describe anything.
CGO_ENABLED=0 go build -mod readonly -tags '' -ldflags '-w -s -X github.com/k3d-io/k3d/v5/version.Version=42f404c6 -X github.com/k3d-io/k3d/v5/version.K3sVersion=v1.25.4-k3s1' -gcflags '' -o '/Users/padlar/sandbox/k3d/bin/k3d'
DEBU[0000] DOCKER_SOCK=/var/run/docker.sock
DEBU[0000] Runtime Info:
&{Name:docker Endpoint:/var/run/docker.sock Version:20.10.12 OSType:linux OS:Docker Desktop Arch:x86_64 CgroupVersion:2 CgroupDriver:cgroupfs Filesystem:extfs}
DEBU[0000] Additional CLI Configuration:
cli:
  api-port: ""
  env: []
  k3s-node-labels: []
  k3sargs: []
  ports: []
  registries:
    create: ""
  runtime-labels: []
  volumes: []
hostaliases: []
DEBU[0000] Configuration:
agents: 0
image: docker.io/rancher/k3s:v1.25.4-k3s1
network: ""
options:
  k3d:
    disableimagevolume: false
    disableloadbalancer: false
    disablerollback: false
    loadbalancer:
      configoverrides: []
    timeout: 0s
    wait: true
  kubeconfig:
    switchcurrentcontext: true
    updatedefaultkubeconfig: true
  runtime:
    agentsmemory: ""
    gpurequest: ""
    hostpidmode: "true"
    serversmemory: ""
registries:
  config: test2.yaml
  use: []
servers: 1

@erikgb
Copy link
Contributor

erikgb commented Jan 11, 2023

@iwilltry42 Do you mind taking a look at this (small) PR? 🙏

Copy link
Contributor

@erikgb erikgb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@iwilltry42
Copy link
Member

Thank you!

@iwilltry42 iwilltry42 merged commit 16d400a into k3d-io:main Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Add viper support for reading in registries.Config from ENV
3 participants